package per.zqx.msrw.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import org.springframework.lang.Nullable;

/**
 * MyRoutingDataSource, 路由选择类
 *
 * @author Sa, Zhang 2021-12-28 12:49
 */
public class MyRoutingDataSource extends AbstractRoutingDataSource {

    @Nullable
    @Override
    protected Object determineCurrentLookupKey() {
        return DBContextHolder.getContextHolder();
    }
}
